package tools

import (
	"crypto/tls"
	"fmt"
	"io/ioutil"
	"net/http"
)

func GetReq(url_str string) string {

	tr := &http.Transport{
		TLSClientConfig:    &tls.Config{InsecureSkipVerify: true},
	}
	client := &http.Client{Transport: tr}

	//client := &http.Client{}
	req, _ := http.NewRequest("GET", url_str, nil)
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
	resp, err := client.Do(req)
	if err != nil {
		fmt.Println(err.Error())
		return "err"
	}
	defer resp.Body.Close()
	respBytes, err := ioutil.ReadAll(resp.Body)
	return string(respBytes)
}
